﻿function setObject(src, left, top, className, alias) {
    var objAppended = $("<img src='/img/" + className + "s/" + src + ".png' id='" + src + "' tittle='" + alias + "' class='" + className + "' style='left:" + left + "%;top:" + top + "%'/>").appendTo($("#gameBorder"));
    $(objAppended).bind("click", function () {
        var alias = $(this).attr("tittle");
        var action = /*(className == "thing") ? "take " :*/ "touch ";
        sendCommand(action + alias);
        /*if (className == "thing")
            $(this).remove();*/
    });
}

function setRoom(src) {
    $(".room").remove();
    $(".thing").remove();
    $(".actor").remove();
    $("<img src='/img/rooms/" + src + ".png' class='room' />").appendTo($("#gameBorder"));
}